mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 12:06:29 +00:00
fix: adds null checks
This commit is contained in:
parent
a876de73f1
commit
b845e427e2
1 changed files with 15 additions and 2 deletions
|
|
@ -15,9 +15,22 @@ namespace PepperDash.Core
|
||||||
{
|
{
|
||||||
private WebSocketServer _wssv;
|
private WebSocketServer _wssv;
|
||||||
|
|
||||||
public int Port { get { return _wssv.Port; } }
|
public int Port
|
||||||
|
{ get
|
||||||
|
{
|
||||||
|
|
||||||
|
if(_wssv == null) return 0;
|
||||||
|
return _wssv.Port;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsListening { get { return _wssv.IsListening; } }
|
public bool IsListening
|
||||||
|
{ get
|
||||||
|
{
|
||||||
|
if (_wssv == null) return false;
|
||||||
|
return _wssv.IsListening;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private readonly IFormatProvider _formatProvider;
|
private readonly IFormatProvider _formatProvider;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue