[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Lag on trigger

Lag on trigger

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Yungen2003   USA  (34 posts)  [Biography] bio
Date Sat 04 Jul 2009 07:10 AM (UTC)

Amended on Sat 04 Jul 2009 07:11 AM (UTC) by Yungen2003

Message
I have a little issue doesn't really bother me at all figured I'd report it tho.


<aliases>
<alias
match="reco"
enabled="y"
send_to="12"
sequence="100"
>
<send>Disconnect()
Connect()</send>
</alias>
</aliases>


Doesn't lag but this does


<triggers>
<trigger
enabled="y"
group="Xpquest Request"
match="You may now do another XP Quest!"
send_to="12"
sequence="100"
>
<send>Disconnect()
Connect()</send>
</trigger>
</triggers>


upwords of some minute to 2 for the mud to resolve and on a few times has caused mushclient to totally freeze

I belive a man should be judged by the quality of his work not the quality of his piss
[Go to top] top

Posted by Fadedparadox   USA  (91 posts)  [Biography] bio
Date Reply #1 on Sat 04 Jul 2009 08:07 AM (UTC)
Message
I tested it myself and it seems to work fine.
[Go to top] top

Posted by Yungen2003   USA  (34 posts)  [Biography] bio
Date Reply #2 on Sat 04 Jul 2009 08:15 AM (UTC)
Message
Are you using V 4.41? im running atm

4.40 on windows 7 RC build 7000

I belive a man should be judged by the quality of his work not the quality of his piss
[Go to top] top

Posted by Fadedparadox   USA  (91 posts)  [Biography] bio
Date Reply #3 on Sat 04 Jul 2009 08:23 AM (UTC)
Message
I'm using MUSHclient 4.40 on Ubuntu 9.04 (with Wine) and Windows XP SP3. I couldn't make it lag in the slightest in either OS.
[Go to top] top

Posted by Yungen2003   USA  (34 posts)  [Biography] bio
Date Reply #4 on Sat 04 Jul 2009 08:26 AM (UTC)
Message
hmm odd atleast with wine it should if there was any problem os wise...maybe my world file is bugged somewhere no clue...going to make a fresh world file and see if that doesn't resolve the issue

I belive a man should be judged by the quality of his work not the quality of his piss
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sun 05 Jul 2009 12:23 AM (UTC)

Amended on Sun 05 Jul 2009 12:27 AM (UTC) by Nick Gammon

Message
Well, I wouldn't do this in a trigger anyway:


Disconnect()
Connect()


Why? When MUSHclient is processing a trigger, it is probably half-way through processing the current packet (in other words, there might be another line following the one you are triggering on, like a prompt line).

Now, in the middle of processing an incoming packet, and sending back responses to the MUD, you yank the connection away by doing Disconnect ().

Then you reconnect by doing Connect() - but connecting is asynchronous. That is, a connecting to anything on the Internet takes time. For a start, the client sends out a SYN packet, then the server responds with ACK or RST, and if you get an ACK the client then ACKs the ACK. After all this, the connection is established.

To save the client "hanging" whilst connecting, all this is happening in the background. This is noted in the help for the Connect function:


Note that since connecting is "asynchronous" you are not actually connected when this command completes. A return value of eOK simply means that the connection process has successfully started.


So, once your trigger fires, you aren't connected any more. Maybe a couple of seconds later you might be. Meanwhile any packets queued up for processing now have to work on a dropped connection.

I just wouldn't do that sequence, any more than I would switch off my car's ignition whilst cruising down the highway, and turn it back on.

The Connect function was really intended to be used when not connected - that is, for something like the auto-reconnector plugin. To use the car analogy, the ignition switch is for starting the engine while the car is stationary.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Sun 05 Jul 2009 12:24 AM (UTC)

Amended on Sun 05 Jul 2009 12:25 AM (UTC) by Nick Gammon

Message
Anyway, why are you disconnecting when you see the message "You may now do another XP Quest!"? Does the MUD have some strange design, that you can't do another quest without disconnecting first?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Yungen2003   USA  (34 posts)  [Biography] bio
Date Reply #7 on Sun 05 Jul 2009 05:48 AM (UTC)
Message
Well no, But If i have alot of commands stacked I have to wait for them to complete or simply just disconnect and reconnect

I belive a man should be judged by the quality of his work not the quality of his piss
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


17,558 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]