luCi lua script causes connection reset

I'm working with Snort.lua and I added a Restart button in addition to the On/Off that is already there.

I tried both and os.execute. Both WORK, in as much as it actually restarts the snort service, but it resets the connection.

local sys = require "luci.sys"
  if status == "running" then                                                         
   button_restart = s:taboption("tab_basic", Button, "restart", translate("Restart: "))                                             
   button_restart.inputtitle = "Restart"                                                          
   button_restart.write = function(self, section)                                                 
     --"service snort restart")                                                         
     os.execute("service snort restart")                                                                                           

I need to figure out why it's resetting the connection to luCi rather than just executing the call without reloading the page.

Appreciate the assistance!