mirror of
https://github.com/transmission/transmission
synced 2025-02-03 21:12:05 +00:00
(rpc) fix crash when quickly toggling rpc on/off reported by John_Clay
This commit is contained in:
parent
88e907383f
commit
26261e3bde
2 changed files with 3 additions and 2 deletions
|
@ -112,7 +112,8 @@ rpcPulse( int socket UNUSED, short action UNUSED, void * vserver )
|
|||
|
||||
assert( server );
|
||||
|
||||
shttpd_poll( server->ctx, 1 );
|
||||
if( server->ctx )
|
||||
shttpd_poll( server->ctx, 1 );
|
||||
|
||||
/* set a timer for the next pulse */
|
||||
if( EVBUFFER_LENGTH( server->in ) || EVBUFFER_LENGTH( server->out ) )
|
||||
|
|
|
@ -117,7 +117,7 @@ readFromPipe( int fd, short eventType, void * veh )
|
|||
{
|
||||
assert( 0 && "unhandled command type!" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue