Skip to content

Commit

Permalink
Added a isStarted function for network numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
compscidr committed Dec 6, 2024
1 parent dcdedf1 commit 1389210
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import com.jasonernst.packetdumper.AbstractPacketDumper

abstract class AbstractServerPacketDumper : AbstractPacketDumper() {
abstract fun start()

abstract fun stop()
abstract fun isStarted(): Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class PcapNgTcpServerPacketDumper(
}
}

override fun isStarted(): Boolean {
return isRunning.get()
}

override fun stop() {
if (!isRunning.get()) {
logger.error("Trying to stop a server that is already stopped")
Expand Down

0 comments on commit 1389210

Please sign in to comment.